<?php

class CHome {
	static function show()
	{       
                global $pageContent, $page;
                $xtpl = new XTemplate('home.html',PAGE_PATH.DS.DS.$page.DS.DS.'tpl');
                $xtpl->assign('HOME_IMG', LAYOUT_URL.'images/home.jpg');
                if (isset($_SESSION['username'])){
                    $xtpl->assign('DISPLAYNAME', $_SESSION["displayname"]);
                    $xtpl->assign('PAGE_TITLE', PAGE_TITLE);
                    $xtpl->parse( 'userWelcome' );
                    $pageContent= $xtpl->text('userWelcome');
                }else{
                    $xtpl->parse( 'guestWelcome' );
                    $pageContent= $xtpl->text('guestWelcome');
                }
             
	}
}
?>